<template>
	<view>
		<button type="primary" @tap="getPhoneNumber">模拟快速登录</button>
	</view>
</template>

<script setup>
	import {getLogin} from '../../request/request';
	let app=getApp()
	let getPhoneNumber=async()=>{
		let res=await getLogin('17133858196')
		// app.globalData.token=res.result.token
		
		uni.setStorageSync('token',res.result.token)
		
		console.log(res);
		if(res.code=='1'){
			uni.showToast({
				title:res.msg,
				icon:'success'
			})
			setTimeout(()=>{
				uni.switchTab({
					url:"/pages/my/my"
				})
			},500)
		}else{
			uni.showToast({
				url:"/pages/lx/lx"
			})
		}
	}
</script>

<style>

</style>
